import request from '@/utils/request'

// 查询采集商品
export function listCollectProduct(query) {
  return request({
    url: '/gather/gather/collectProduct/list',
    method: 'get',
    params: query
  })
}


// 查询采集商品
export function getCollectProduct(id) {
  return request({
    url: '/gather/gather/collectProduct/' + id,
    method: 'get'
  })
}

// 修改采集商品
export function updateCollectProduct(data) {
  return request({
    url: '/gather/gather/collectProduct',
    method: 'put',
    data: data
  })
}


// 商品刊登
export function collectProductPublish(query) {
  return request({
    url: '/gather/collectProduct/publish',
    method: 'get',
    params: query
  })
}

// 商品属性
export function categoryInfo(id) {
  return request({
    url: '/aliexpress/category/getCategoryInfoById?id=' + id,
    method: 'get'
  })
}

// 详情页翻译
export function translate(query) {
  return request({
    url: '/gather/chatgpt/translate',
    method: 'post',
    data: query
  })
}
